package com.cookor.poi.modules.phy.entity;

import com.cookor.poi.common.persistence.DataEntity;
import com.cookor.poi.modules.tenant.entity.TTenant;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal;
import java.util.Date;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;

public class TAction extends DataEntity<TAction> {
  public static final int action_status_wait = 0;
  
  public static final int action_status_ing = 1;
  
  public static final int action_status_end = 2;
  
  private static final long serialVersionUID = 1L;
  
  private Integer tenantId;
  
  private Integer doctorId;
  
  private Integer sort;
  
  private Date actionDate;
  
  private Integer actionDetailType;
  
  private String actionDetailDate;
  
  private String rule;
  
  private String amStartDate;
  
  private String amEndDate;
  
  private String pmStartDate;
  
  private String pmEndDate;
  
  private Integer amStock;
  
  private Integer pmStock;
  
  private Date beginDate;
  
  private Date endDate;
  
  private BigDecimal fee;
  
  private Integer minPeople;
  
  private Integer groupStatus;
  
  private Integer status;
  
  private TTenant tenant;
  
  private TDoctor doctor;
  
  private String tenantName;
  
  private String doctorName;
  
  private Date queryBeginDateUp;
  
  private Date queryBeginDateDown;
  
  private Date queryEndDateDown;
  
  private Date queryActionDateUp;
  
  private Date queryActionDateDown;
  
  private String queryName;
  
  private String dateOneBgein;
  
  private String dateOneEnd;
  
  private String dateTwoBgein;
  
  private String dateTwoEnd;
  
  private String dateThreeBgein;
  
  private String dateThreeEnd;
  
  private Integer officeId;
  
  private TStock tStock;
  
  public TAction() {}
  
  public TAction(String id) {
    super(id);
  }
  
  @NotNull(message = "租户id不能为空")
  public Integer getTenantId() {
    return this.tenantId;
  }
  
  public void setTenantId(Integer tenantId) {
    this.tenantId = tenantId;
  }
  
  @NotNull(message = "医生id不能为空")
  public Integer getDoctorId() {
    return this.doctorId;
  }
  
  public void setDoctorId(Integer doctorId) {
    this.doctorId = doctorId;
  }
  
  @NotNull(message = "排序")
  public Integer getSort() {
    return this.sort;
  }
  
  public void setSort(Integer sort) {
    this.sort = sort;
  }
  
  @JsonFormat(pattern = "yyyy年MM月dd日")
  @NotNull(message = "坐诊时间不能为空")
  public Date getActionDate() {
    return this.actionDate;
  }
  
  public void setActionDate(Date actionDate) {
    this.actionDate = actionDate;
  }
  
  @Length(min = 1, max = 255, message = "具体时间，逗号分隔长度必须介于 1 和 255 之间")
  public String getActionDetailDate() {
    return this.actionDetailDate;
  }
  
  public void setActionDetailDate(String actionDetailDate) {
    this.actionDetailDate = actionDetailDate;
  }
  
  public String getRule() {
    return this.rule;
  }
  
  public void setRule(String rule) {
    this.rule = rule;
  }
  
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  @NotNull(message = "活动开始时间不能为空")
  public Date getBeginDate() {
    return this.beginDate;
  }
  
  public void setBeginDate(Date beginDate) {
    this.beginDate = beginDate;
  }
  
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  @NotNull(message = "活动结束时间不能为空")
  public Date getEndDate() {
    return this.endDate;
  }
  
  public void setEndDate(Date endDate) {
    this.endDate = endDate;
  }
  
  public BigDecimal getFee() {
    return this.fee;
  }
  
  public void setFee(BigDecimal fee) {
    this.fee = fee;
  }
  
  @NotNull(message = "最低报名人数不能为空")
  public Integer getMinPeople() {
    return this.minPeople;
  }
  
  public void setMinPeople(Integer minPeople) {
    this.minPeople = minPeople;
  }
  
  public TTenant getTenant() {
    return this.tenant;
  }
  
  public void setTenant(TTenant tenant) {
    this.tenant = tenant;
  }
  
  public TDoctor getDoctor() {
    return this.doctor;
  }
  
  public void setDoctor(TDoctor doctor) {
    this.doctor = doctor;
  }
  
  public String getTenantName() {
    return this.tenantName;
  }
  
  public void setTenantName(String tenantName) {
    this.tenantName = tenantName;
  }
  
  public String getDoctorName() {
    return this.doctorName;
  }
  
  public void setDoctorName(String doctorName) {
    this.doctorName = doctorName;
  }
  
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  public Date getQueryBeginDateUp() {
    return this.queryBeginDateUp;
  }
  
  public void setQueryBeginDateUp(Date queryBeginDateUp) {
    this.queryBeginDateUp = queryBeginDateUp;
  }
  
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  public Date getQueryBeginDateDown() {
    return this.queryBeginDateDown;
  }
  
  public void setQueryBeginDateDown(Date queryBeginDateDown) {
    this.queryBeginDateDown = queryBeginDateDown;
  }
  
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  public Date getQueryEndDateDown() {
    return this.queryEndDateDown;
  }
  
  public void setQueryEndDateDown(Date queryEndDateDown) {
    this.queryEndDateDown = queryEndDateDown;
  }
  
  public Date getQueryActionDateUp() {
    return this.queryActionDateUp;
  }
  
  public void setQueryActionDateUp(Date queryActionDateUp) {
    this.queryActionDateUp = queryActionDateUp;
  }
  
  public Date getQueryActionDateDown() {
    return this.queryActionDateDown;
  }
  
  public void setQueryActionDateDown(Date queryActionDateDown) {
    this.queryActionDateDown = queryActionDateDown;
  }
  
  public String getQueryName() {
    return this.queryName;
  }
  
  public void setQueryName(String queryName) {
    this.queryName = queryName;
  }
  
  public Integer getActionDetailType() {
    return this.actionDetailType;
  }
  
  public void setActionDetailType(Integer actionDetailType) {
    this.actionDetailType = actionDetailType;
  }
  
  public String getDateOneBgein() {
    return this.dateOneBgein;
  }
  
  public void setDateOneBgein(String dateOneBgein) {
    this.dateOneBgein = dateOneBgein;
  }
  
  public String getDateOneEnd() {
    return this.dateOneEnd;
  }
  
  public void setDateOneEnd(String dateOneEnd) {
    this.dateOneEnd = dateOneEnd;
  }
  
  public String getDateTwoBgein() {
    return this.dateTwoBgein;
  }
  
  public void setDateTwoBgein(String dateTwoBgein) {
    this.dateTwoBgein = dateTwoBgein;
  }
  
  public String getDateTwoEnd() {
    return this.dateTwoEnd;
  }
  
  public void setDateTwoEnd(String dateTwoEnd) {
    this.dateTwoEnd = dateTwoEnd;
  }
  
  public String getDateThreeBgein() {
    return this.dateThreeBgein;
  }
  
  public void setDateThreeBgein(String dateThreeBgein) {
    this.dateThreeBgein = dateThreeBgein;
  }
  
  public String getDateThreeEnd() {
    return this.dateThreeEnd;
  }
  
  public void setDateThreeEnd(String dateThreeEnd) {
    this.dateThreeEnd = dateThreeEnd;
  }
  
  public Integer getAmStock() {
    return this.amStock;
  }
  
  public void setAmStock(Integer amStock) {
    this.amStock = amStock;
  }
  
  public Integer getPmStock() {
    return this.pmStock;
  }
  
  public void setPmStock(Integer pmStock) {
    this.pmStock = pmStock;
  }
  
  public String getAmStartDate() {
    return this.amStartDate;
  }
  
  public void setAmStartDate(String amStartDate) {
    this.amStartDate = amStartDate;
  }
  
  public String getAmEndDate() {
    return this.amEndDate;
  }
  
  public void setAmEndDate(String amEndDate) {
    this.amEndDate = amEndDate;
  }
  
  public String getPmStartDate() {
    return this.pmStartDate;
  }
  
  public void setPmStartDate(String pmStartDate) {
    this.pmStartDate = pmStartDate;
  }
  
  public String getPmEndDate() {
    return this.pmEndDate;
  }
  
  public void setPmEndDate(String pmEndDate) {
    this.pmEndDate = pmEndDate;
  }
  
  public Integer getOfficeId() {
    return this.officeId;
  }
  
  public void setOfficeId(Integer officeId) {
    this.officeId = officeId;
  }
  
  public Integer getStatus() {
    return this.status;
  }
  
  public void setStatus(Integer status) {
    this.status = status;
  }
  
  public TStock gettStock() {
    return this.tStock;
  }
  
  public void settStock(TStock tStock) {
    this.tStock = tStock;
  }
  
  public Integer getLostStock() {
    return Integer.valueOf((gettStock() == null) ? (((this.amStock == null) ? 0 : this.amStock
        .intValue()) + ((this.pmStock == null) ? 0 : this.pmStock.intValue())) : gettStock().getStock().intValue());
  }
  
  public Integer getActionNum() {
    return Integer.valueOf((gettStock() == null) ? 0 : (((this.amStock == null) ? 0 : this.amStock.intValue()) + ((this.pmStock == null) ? 0 : this.pmStock.intValue()) - gettStock().getStock().intValue()));
  }
  
  public Integer getGroupStatus() {
    return this.groupStatus;
  }
  
  public void setGroupStatus(Integer groupStatus) {
    this.groupStatus = groupStatus;
  }
}
